package com.xiongwei.factory;

/**
 * @author XiongWei
 * @date 2024/1/9
 */
public class OrderPizza3 extends FactoryMethod{

    @Override
    Pizza createPizza(String type) {
        Pizza pizza = null;
        if (type.equals("cheese")) {
            pizza = new BJCheesePizza();
        } else if (type.equals("pepper")) {
            pizza = new BJPepperPizza();
        }

        return pizza;
    }
}
